﻿@using Microsoft.AspNet.Identity
@model Vizzio.Models.ManageUserViewModel

<p>Usted esta registrado como: <strong>@User.Identity.GetUserName()</strong>.</p>

@using (Html.BeginForm("Manage", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
{
    @Html.AntiForgeryToken()
    <h4>Cambie su contraseña</h4>
    <hr />
    @Html.ValidationSummary()
    
    <div class="control-group form-group">
            @Html.LabelFor(model => model.OldPassword, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.PasswordFor(model => model.OldPassword, new { @class = "form-control", required = "", data_validation_required_message = "Debe ingresar su contraseña actual", maxlength = "20", data_validation_maxlength_message = "Muy largo: Ingrese 20 o menos caracteres"})
                
            </div>
        </div>
    
    <div class="control-group form-group">
            @Html.LabelFor(model => model.NewPassword, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.PasswordFor(model => model.NewPassword, new { @class = "form-control", required = "", data_validation_required_message = "Campo requerido", maxlength = "20", data_validation_maxlength_message = "Muy largo: Ingrese 20 o menos caracteres", minlength = "6", data_validation_minlength_message = "Muy corto: Ingrese al menos 6 caracteres" })
                <p class="help-block">Requerido: 6 a 20 Caracteres</p>
            </div>
        </div>
    
    <div class="control-group form-group">
            @Html.LabelFor(model => model.ConfirmPassword, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.PasswordFor(model => model.ConfirmPassword, new { @class = "form-control", @data_validation_match_match = "NewPassword", data_validation_match_message = "La contraseña no coincide" })
                <p class="help-block">Repita la contraseña</p>
            </div>
        </div>

    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <input type="submit" value="Cambiar contraseña" class="btn btn-primary" />
        </div>
    </div>
}
